Title Banner


Technical Q&A's


GXPD 29 - Crash When Sending Messages in an Override (1-Aug-95)


Q I am trying to send messages from within a GX message override. I want to send GXWriteData to flush the buffer (page 4-146, Inside Mac: Printing Extensions and Drivers) so that I can send the GXGetDeviceStatus message. I override the gxHandlePanelEvent message.

In my override, sending messages causes the system to crash so that the interrupt button does not summon MacsBug. What would cause this to happen?

A The crash is occurring because there is no connection to the printer at the time you are sending the message. You have to send the OpenConnection, WriteData, and then CloseConnection messages. Note that when you call OpenConnection, QuickDraw GX puts up the default JobStatus dialog for a short time. If you don't want this dialog to appear, you can to override the GXJobStatus message to prevent it from being shown.
See also Dave Hersey's article, "Writing QuickDraw GX Driver with Custom I/O and Buffering," in develop 21.

Technical Support
Technical Q&As
Previous Question | Contents | Next Question

Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help